<?php

namespace Lambq\Paginateroute;

use Lambq\Paginateroute\Route\PaginateRoute;
use Illuminate\Support\ServiceProvider;

class PaginateRouteServiceProvider extends ServiceProvider
{
    /**
     * 资源发布注册.
     *
     * @return void
     */
    public function boot()
    {
        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__.'/../resources/lang' => base_path('resources/lang/vendor/paginateroute'),
                'lambq-paginateroute-lang'
            ]);
        }

    }


    public function register()
    {
        $this->app->singleton('PaginateRoute',function (){
            return new PaginateRoute();
        });
    }
}